3.2.92 \(\int \frac {x^2 (c+d x)}{a+b x} \, dx\)

Optimal. Leaf size=66 \[ \frac {a^2 (b c-a d) \log (a+b x)}{b^4}-\frac {a x (b c-a d)}{b^3}+\frac {x^2 (b c-a d)}{2 b^2}+\frac {d x^3}{3 b} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {77} \begin {gather*} \frac {a^2 (b c-a d) \log (a+b x)}{b^4}+\frac {x^2 (b c-a d)}{2 b^2}-\frac {a x (b c-a d)}{b^3}+\frac {d x^3}{3 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(c + d*x))/(a + b*x),x]

[Out]

-((a*(b*c - a*d)*x)/b^3) + ((b*c - a*d)*x^2)/(2*b^2) + (d*x^3)/(3*b) + (a^2*(b*c - a*d)*Log[a + b*x])/b^4

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin {align*} \int \frac {x^2 (c+d x)}{a+b x} \, dx &=\int \left (\frac {a (-b c+a d)}{b^3}+\frac {(b c-a d) x}{b^2}+\frac {d x^2}{b}-\frac {a^2 (-b c+a d)}{b^3 (a+b x)}\right ) \, dx\\ &=-\frac {a (b c-a d) x}{b^3}+\frac {(b c-a d) x^2}{2 b^2}+\frac {d x^3}{3 b}+\frac {a^2 (b c-a d) \log (a+b x)}{b^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 61, normalized size = 0.92 \begin {gather*} \frac {b x \left (6 a^2 d-3 a b (2 c+d x)+b^2 x (3 c+2 d x)\right )+6 a^2 (b c-a d) \log (a+b x)}{6 b^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(c + d*x))/(a + b*x),x]

[Out]

(b*x*(6*a^2*d - 3*a*b*(2*c + d*x) + b^2*x*(3*c + 2*d*x)) + 6*a^2*(b*c - a*d)*Log[a + b*x])/(6*b^4)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^2 (c+d x)}{a+b x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(x^2*(c + d*x))/(a + b*x),x]

[Out]

IntegrateAlgebraic[(x^2*(c + d*x))/(a + b*x), x]

________________________________________________________________________________________

fricas [A]  time = 1.33, size = 71, normalized size = 1.08 \begin {gather*} \frac {2 \, b^{3} d x^{3} + 3 \, {\left (b^{3} c - a b^{2} d\right )} x^{2} - 6 \, {\left (a b^{2} c - a^{2} b d\right )} x + 6 \, {\left (a^{2} b c - a^{3} d\right )} \log \left (b x + a\right )}{6 \, b^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x+c)/(b*x+a),x, algorithm="fricas")

[Out]

1/6*(2*b^3*d*x^3 + 3*(b^3*c - a*b^2*d)*x^2 - 6*(a*b^2*c - a^2*b*d)*x + 6*(a^2*b*c - a^3*d)*log(b*x + a))/b^4

________________________________________________________________________________________

giac [A]  time = 1.12, size = 70, normalized size = 1.06 \begin {gather*} \frac {2 \, b^{2} d x^{3} + 3 \, b^{2} c x^{2} - 3 \, a b d x^{2} - 6 \, a b c x + 6 \, a^{2} d x}{6 \, b^{3}} + \frac {{\left (a^{2} b c - a^{3} d\right )} \log \left ({\left | b x + a \right |}\right )}{b^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x+c)/(b*x+a),x, algorithm="giac")

[Out]

1/6*(2*b^2*d*x^3 + 3*b^2*c*x^2 - 3*a*b*d*x^2 - 6*a*b*c*x + 6*a^2*d*x)/b^3 + (a^2*b*c - a^3*d)*log(abs(b*x + a)
)/b^4

________________________________________________________________________________________

maple [A]  time = 0.00, size = 76, normalized size = 1.15 \begin {gather*} \frac {d \,x^{3}}{3 b}-\frac {a d \,x^{2}}{2 b^{2}}+\frac {c \,x^{2}}{2 b}-\frac {a^{3} d \ln \left (b x +a \right )}{b^{4}}+\frac {a^{2} c \ln \left (b x +a \right )}{b^{3}}+\frac {a^{2} d x}{b^{3}}-\frac {a c x}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(d*x+c)/(b*x+a),x)

[Out]

1/3*d*x^3/b-1/2/b^2*x^2*a*d+1/2/b*x^2*c+1/b^3*x*a^2*d-1/b^2*x*a*c-a^3/b^4*ln(b*x+a)*d+a^2/b^3*ln(b*x+a)*c

________________________________________________________________________________________

maxima [A]  time = 0.98, size = 69, normalized size = 1.05 \begin {gather*} \frac {2 \, b^{2} d x^{3} + 3 \, {\left (b^{2} c - a b d\right )} x^{2} - 6 \, {\left (a b c - a^{2} d\right )} x}{6 \, b^{3}} + \frac {{\left (a^{2} b c - a^{3} d\right )} \log \left (b x + a\right )}{b^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x+c)/(b*x+a),x, algorithm="maxima")

[Out]

1/6*(2*b^2*d*x^3 + 3*(b^2*c - a*b*d)*x^2 - 6*(a*b*c - a^2*d)*x)/b^3 + (a^2*b*c - a^3*d)*log(b*x + a)/b^4

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 72, normalized size = 1.09 \begin {gather*} x^2\,\left (\frac {c}{2\,b}-\frac {a\,d}{2\,b^2}\right )-\frac {\ln \left (a+b\,x\right )\,\left (a^3\,d-a^2\,b\,c\right )}{b^4}+\frac {d\,x^3}{3\,b}-\frac {a\,x\,\left (\frac {c}{b}-\frac {a\,d}{b^2}\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(c + d*x))/(a + b*x),x)

[Out]

x^2*(c/(2*b) - (a*d)/(2*b^2)) - (log(a + b*x)*(a^3*d - a^2*b*c))/b^4 + (d*x^3)/(3*b) - (a*x*(c/b - (a*d)/b^2))
/b

________________________________________________________________________________________

sympy [A]  time = 0.37, size = 61, normalized size = 0.92 \begin {gather*} - \frac {a^{2} \left (a d - b c\right ) \log {\left (a + b x \right )}}{b^{4}} + x^{2} \left (- \frac {a d}{2 b^{2}} + \frac {c}{2 b}\right ) + x \left (\frac {a^{2} d}{b^{3}} - \frac {a c}{b^{2}}\right ) + \frac {d x^{3}}{3 b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(d*x+c)/(b*x+a),x)

[Out]

-a**2*(a*d - b*c)*log(a + b*x)/b**4 + x**2*(-a*d/(2*b**2) + c/(2*b)) + x*(a**2*d/b**3 - a*c/b**2) + d*x**3/(3*
b)

________________________________________________________________________________________